
			mui.init({
		        pullRefresh: {
		          container: '#pullrefresh',
		         down: {
		            callback: pulldownRefresh
		          },
		          up: {
		            contentrefresh: '正在加载...',
		            callback: pullupRefresh
		          }
		        }
	      	});
	      	var count = 0;
			var totalNumber  ;//总条数
		//查询接口 https://tsch.fromfuture.cn:7714/GZ/Docpre/queryPageFollow?userid=5FBCE02158CBE97DE050007F01003979&type=001001&title	
			var url=XHDOC_WEBBASE+'Docpre/queryPageFollow';
			function listajax(type,url,count){
				ajaxUtil('get', url, {type:type,pageSize:10,pageNo:count,title:'',userid:XHDOC_APP_USRGUID}, function(data){
				 	var html = '';
				 	totalNumber = data.data.totalPage;
					$('.mui-content').css("display","none"); 
				 	if (totalNumber == 0) {
						$('.mui-content').css("display","block")
						
					} else{
						$('.mui-content').css("display","none") 
						
					}
				 	if (data.code==000) {
				 		var data=data.data.parameterType;
				 		console.log(data);
				 		for (var i=0;i<data.length;i++) {
					 		html +=
					 			'<li class="mui-table-view-cell" data-id="'+data[i].id+'" data-title="'+data[i].title+'" data-content="'+data[i].content+'">'+
									'<div class="mui-slider-right mui-disabled">'+
										'<a class="mui-btn mui-btn-red">删除</a>'+
									'</div>'+
									'<div class="mui-slider-handle mui-table mui-navigate-right">'+
										'<div class="mui-table-cell">'+data[i].title+'</div>'+
									'</div>'+
								'</li>'
						}	
				 			$("#OA_task_2").append(html);
				 	} else{
				 		mui.toast("数据加载失败");
				 	}
				 })
			}
			/**
			   * 下拉刷新具体业务实现
			*/
		  	function pulldownRefresh() {
			    setTimeout(function() {	          
			      mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //refresh completed
			    },500);
		    
		  	}
			/**
			   * 上拉加载具体业务实现
			*/
		  	function pullupRefresh() {
			
		        setTimeout(function() { 
		          mui('#pullrefresh').pullRefresh().endPullupToRefresh((++count >= totalNumber+1)); //参数为true代表没有更多数据了。
					listajax(type,url,count)
		        }, 500);
		  	}
	
		  	if(mui.os.plus) {
		        mui.plusReady(function() {
		          	setTimeout(function() {
		            	mui('#pullrefresh').pullRefresh().pullupLoading();
		      		}, 500);
		
		        });
		  	} else {
		        mui.ready(function() {
		          mui('#pullrefresh').pullRefresh().pullupLoading();
		        });
		  	}
		//删除接口	https://tsch.fromfuture.cn:7714/GZ/Docpre/updateState?id=174BD3D5879C3BF0E050007F010077DC
		var btnArray = ['确认', '取消'];
		//第二个demo，向左拖拽后显示操作图标，释放后自动触发的业务逻辑
		mui('#OA_task_2').on('slideleft', '.mui-table-view-cell', function(event) {
			var elem = this;
			var id = $(this).data("id");
			//console.log(id);
			mui.confirm('确认删除该条记录？', '提示', btnArray, function(e) {
				var url=XHDOC_WEBBASE+'Docpre/updateState';
				
				if (e.index == 0) {
					ajaxUtil('post', url, {id:id}, function(data){
					 	console.log(data);
					 	if (data.code==000) {
					 		mui.toast("删除成功");
					 		elem.parentNode.removeChild(elem);
					 		setTimeout(function(){
					 			
					 		},200)
					 	} else{
					 		mui.toast("删除失败");
					 	}
					 })
				} else {
					setTimeout(function() {
						mui.swipeoutClose(elem);
					}, 0);
				}
				
			});
		});
		/*点击打开编辑页面*/
		
		function entrypage(a,b){
			mui('#OA_task_2').on('tap', '.mui-table-view-cell', function(event) {
				var id = $(this).data("id");
				var title = $(this).data("title");
				var content = this.getAttribute("data-content");
				var extras = {'id':id,'title':title,'content':content};

				 newobj.setItem("extras",extras);
				if(!mui.os.plus) {
					location.href =a+'?id='+id+'&title='+title+'&content='+content;
				}else{
					showpage(a, a,{id:id,title:title,content:content})
					
				}
				
			});
			/*打开新建页面*/
			mui("body").on('tap', '.mybutton', function(event) {
				 showpage(b, b)
			})
		}
		
		
		
		
